package main.SQL.objects;

import java.sql.ResultSet;
import java.sql.SQLException;

public class SQLDocumentAssignment {

    private int id;
    private int docId;
    private int taskId;
    private int projectId;
    private int smetId;
    private String dbName;

    public SQLDocumentAssignment() {

    }

    //region Конструктор для загрузки документов из Primavera
    public SQLDocumentAssignment(ResultSet rs) throws SQLException {

//        this.docId = rs.getInt("doc_id");
//        this.statusId = rs.getInt("status_id");
//        this.catgId = rs.getInt("catg_id");
//        this.parentDocId = rs.getInt("parent_doc_id");
//        this.docName = rs.getString("doc_name");
//        this.docNumber = rs.getString("doc_number");
//        this.docAuthor = rs.getString("doc_author");
//        this.projectId = rs.getInt("proj_id");
//        this.dbName = rs.getString("db_name");
//
//        if (rs.getObject("import_factage") != null) this.isImportFactage = rs.getInt("import_factage");
//        if (rs.getObject("eps_id") != null) this.epsId = rs.getInt("eps_id");
//        if (rs.getObject("titul_id") != null) this.titulId = rs.getInt("titul_id");
//        if (rs.getObject("object_id") != null) this.objectId = rs.getInt("object_id");
//        if (rs.getObject("smet_id") != null) this.smetId = rs.getInt("smet_id");

    }
    //endregion


}
